/*
 * @Author: xielikang
 * @Date: 2021-09-30 10:03:42
 * @Purpose: 布局
 * @Last Modified by: xielikang
 * @Last Modified time: 2022-08-10 17:49:14
 */

.page {
  position: relative;
  height: auto;
  min-height: 100%;
  z-index: 5;
}

.max-width {
  max-width: 1100px;
  margin: 0 auto;

  &--sm {
    max-width: 700px;
  }
}

.container {
  padding: 50px 30px;
}

.box {
  padding: 10px 15px;
}

.detail-box {
  max-width: 700px;
  margin: 0 auto;
  color: black;
  background-color: white;
  text-align: center;
  font-size: 12px;
  padding: 30px 15px;
  border-radius: var(--border-radius);
  border: 4px solid var(--color-success);
}

@media screen and (max-width: 767px) {
  .container,
  .box,
  .detail-box {
    padding: 10px;
  }
}

.inline {
  display: inline-block !important;
}

// 定位
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 10;
}

.sticky {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 10;
}

.abs {
  position: absolute;
  z-index: 10;
}

.rel {
  position: relative;
  z-index: 5;
}

.fixed {
  position: fixed;
  z-index: 10;

  &--br {
    right: 15px;
    bottom: 100px;
  }
}

.full {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;

  &--abs {
    @extend .abs;
  }
}

// Flex布局
.flex {
  display: flex;

  &--inline {
    display: inline-flex;
  }
}

@for $i from 1 to 13 {
  .flex-#{$i} {
    flex-grow: #{$i};
  }
}

.flex-fs-0 {
  flex-shrink: 0;
}

.flex-col {
  flex-flow: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-rl {
  justify-content: flex-start;
}

.flex-rc {
  justify-content: center;
}

.flex-rr {
  justify-content: flex-end;
}

.flex-rb {
  justify-content: space-between;
}

.flex-ct {
  align-items: flex-start;
}

.flex-cc {
  align-items: center;
}

.flex-cb {
  align-items: flex-end;
}

.flex-center {
  @extend .flex-rc, .flex-cc;
}
